package dongwu;

abstract class Animal {
    private String name;
    private int age;

    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }

    // get  //
    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    // 抽象方法 makesound //
    public abstract void makeSound();
}

// 接口  //
interface Trainable {
    void train();
}

// 接口  //
interface Swimmable {
    void swim();
}
